Optimal. Leaf size=95 \[ -\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d}+\frac {2 b \sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {x \left (a^2+2 b^2\right )}{2 a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3872, 2865, 2735, 2660, 618, 206} \[ \frac {2 b \sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {x \left (a^2+2 b^2\right )}{2 a^3}-\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 2660
Rule 2735
Rule 2865
Rule 3872
Rubi steps
\begin {align*} \int \frac {\cosh ^2(c+d x)}{a+b \text {csch}(c+d x)} \, dx &=i \int \frac {\cosh ^2(c+d x) \sinh (c+d x)}{i b+i a \sinh (c+d x)} \, dx\\ &=-\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d}+\frac {\int \frac {-i a b+i \left (a^2+2 b^2\right ) \sinh (c+d x)}{i b+i a \sinh (c+d x)} \, dx}{2 a^2}\\ &=\frac {\left (a^2+2 b^2\right ) x}{2 a^3}-\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d}-\frac {\left (i b \left (a^2+b^2\right )\right ) \int \frac {1}{i b+i a \sinh (c+d x)} \, dx}{a^3}\\ &=\frac {\left (a^2+2 b^2\right ) x}{2 a^3}-\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d}-\frac {\left (2 b \left (a^2+b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{i b+2 a x+i b x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{a^3 d}\\ &=\frac {\left (a^2+2 b^2\right ) x}{2 a^3}-\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d}+\frac {\left (4 b \left (a^2+b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 \left (a^2+b^2\right )-x^2} \, dx,x,2 a+2 i b \tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{a^3 d}\\ &=\frac {\left (a^2+2 b^2\right ) x}{2 a^3}+\frac {2 b \sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {a-b \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {\cosh (c+d x) (2 b-a \sinh (c+d x))}{2 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.54, size = 109, normalized size = 1.15 \[ \frac {8 b \sqrt {-a^2-b^2} \tan ^{-1}\left (\frac {a-b \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )+a^2 \sinh (2 (c+d x))+2 a^2 c+2 a^2 d x-4 a b \cosh (c+d x)+4 b^2 c+4 b^2 d x}{4 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.43, size = 446, normalized size = 4.69 \[ \frac {a^{2} \cosh \left (d x + c\right )^{4} + a^{2} \sinh \left (d x + c\right )^{4} + 4 \, {\left (a^{2} + 2 \, b^{2}\right )} d x \cosh \left (d x + c\right )^{2} - 4 \, a b \cosh \left (d x + c\right )^{3} + 4 \, {\left (a^{2} \cosh \left (d x + c\right ) - a b\right )} \sinh \left (d x + c\right )^{3} - 4 \, a b \cosh \left (d x + c\right ) + 2 \, {\left (3 \, a^{2} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} + 2 \, b^{2}\right )} d x - 6 \, a b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + 8 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2}\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {a^{2} \cosh \left (d x + c\right )^{2} + a^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + a^{2} + 2 \, b^{2} + 2 \, {\left (a^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + b\right )}}{a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) + 2 \, {\left (a \cosh \left (d x + c\right ) + b\right )} \sinh \left (d x + c\right ) - a}\right ) - a^{2} + 4 \, {\left (a^{2} \cosh \left (d x + c\right )^{3} + 2 \, {\left (a^{2} + 2 \, b^{2}\right )} d x \cosh \left (d x + c\right ) - 3 \, a b \cosh \left (d x + c\right )^{2} - a b\right )} \sinh \left (d x + c\right )}{8 \, {\left (a^{3} d \cosh \left (d x + c\right )^{2} + 2 \, a^{3} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{3} d \sinh \left (d x + c\right )^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 155, normalized size = 1.63 \[ \frac {\frac {4 \, {\left (a^{2} + 2 \, b^{2}\right )} {\left (d x + c\right )}}{a^{3}} + \frac {a e^{\left (2 \, d x + 2 \, c\right )} - 4 \, b e^{\left (d x + c\right )}}{a^{2}} - \frac {{\left (4 \, a b e^{\left (d x + c\right )} + a^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{a^{3}} - \frac {8 \, {\left (a^{2} b + b^{3}\right )} \log \left (\frac {{\left | 2 \, a e^{\left (d x + c\right )} + 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a e^{\left (d x + c\right )} + 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} a^{3}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.28, size = 260, normalized size = 2.74 \[ \frac {1}{2 d a \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {1}{2 d a \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {b}{d \,a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d a}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{2}}{d \,a^{3}}-\frac {1}{2 d a \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {1}{2 d a \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {b}{d \,a^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d a}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{2}}{d \,a^{3}}-\frac {2 b \sqrt {a^{2}+b^{2}}\, \arctanh \left (\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 168, normalized size = 1.77 \[ -\frac {{\left (4 \, b e^{\left (-d x - c\right )} - a\right )} e^{\left (2 \, d x + 2 \, c\right )}}{8 \, a^{2} d} + \frac {{\left (a^{2} + 2 \, b^{2}\right )} {\left (d x + c\right )}}{2 \, a^{3} d} - \frac {4 \, b e^{\left (-d x - c\right )} + a e^{\left (-2 \, d x - 2 \, c\right )}}{8 \, a^{2} d} - \frac {{\left (a^{2} b + b^{3}\right )} \log \left (\frac {a e^{\left (-d x - c\right )} - b - \sqrt {a^{2} + b^{2}}}{a e^{\left (-d x - c\right )} - b + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.83, size = 212, normalized size = 2.23 \[ \frac {{\mathrm {e}}^{2\,c+2\,d\,x}}{8\,a\,d}-\frac {{\mathrm {e}}^{-2\,c-2\,d\,x}}{8\,a\,d}+\frac {x\,\left (a^2+2\,b^2\right )}{2\,a^3}-\frac {b\,{\mathrm {e}}^{-c-d\,x}}{2\,a^2\,d}-\frac {b\,{\mathrm {e}}^{c+d\,x}}{2\,a^2\,d}-\frac {b\,\ln \left (\frac {2\,b\,{\mathrm {e}}^{c+d\,x}\,\left (a^2+b^2\right )}{a^4}-\frac {2\,b\,\sqrt {a^2+b^2}\,\left (a-b\,{\mathrm {e}}^{c+d\,x}\right )}{a^4}\right )\,\sqrt {a^2+b^2}}{a^3\,d}+\frac {b\,\ln \left (\frac {2\,b\,\sqrt {a^2+b^2}\,\left (a-b\,{\mathrm {e}}^{c+d\,x}\right )}{a^4}+\frac {2\,b\,{\mathrm {e}}^{c+d\,x}\,\left (a^2+b^2\right )}{a^4}\right )\,\sqrt {a^2+b^2}}{a^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cosh ^{2}{\left (c + d x \right )}}{a + b \operatorname {csch}{\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________